package main

import (
	"fmt"
	"time"
)

var ch = make(chan int)

func printer(str string){
	for _, i := range str {
		fmt.Printf("%c",i)
		time.Sleep(time.Second)
	}
	fmt.Println("")
}

func person1()  {
	printer("hello")
	ch <- 1
}
func person2()  {
	<- ch
	printer("world")
}

func main(){

	go person1()
	go person2()
	for {
	}
}